package com.Util;

import java.util.List;

import com.alibaba.fastjson.JSON;
import com.entity.ResponseBean;

public class ResponseUtil<T> {

	
	/**
	 * jqGrid返回前的处理
	 * @param reqBean
	 * @param total
	 * @param list
	 * @return
	 */
	public  String dealResponse(int page, int total,int records,List<T> list){
		ResponseBean<T> resBean = new ResponseBean<T>();
		resBean.setPage(page);
		resBean.setTotal(total);
		resBean.setRecords(records);
		resBean.setRows(list);
		return JSON.toJSONString(resBean);
	}
}
